<%@ Import Namespace="iPhOwa.Exchange" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailboxContent.ascx.cs"
	Inherits="iPhOwa.Web.Controls.MailboxContent" %>
<div style="padding: 2px;">
	<asp:HyperLink runat="server" ID="composeLink" NavigateUrl="~/ComposeMessage.aspx">
		<asp:Image runat="server" ID="composeImage" ImageUrl="~/Images/newemail.gif" CssClass="middle" />
		New
	</asp:HyperLink>
</div>
<hr class="divider" />
<asp:Panel ID="noMessagesPanel" runat="server" Visible="false" Style="text-align: center;">
	This folder is empty.
	<hr class="divider" />
</asp:Panel>
<asp:DataList ID="messageList" runat="server" EnableViewState="false" Width="100%"
	CellPadding="0" CellSpacing="0">
	<ItemTemplate>
		<iwc:ClickablePanel runat="server" ID="messageDiv" CssClass='<%# !(bool)Eval("Read") ? "unread" : string.Empty %>'
			Href='<%# string.Concat("ViewMessage.aspx?path=", HttpUtility.UrlEncode(Eval("Href").ToString())) %>'>
			<div style="padding: 2px; height: 16px;">
				<span style="float: left;">
					<asp:Image runat="server" ID="readImage" ImageUrl="~/Images/icon-msg-read.gif" Visible='<%# (bool)Eval("Read") %>'
						CssClass="middle" />
					<asp:Image runat="server" ID="unreadImage" ImageUrl="~/Images/icon-msg-unread.gif"
						Visible='<%# !(bool)Eval("Read") %>' CssClass="middle" />
					<asp:Label ID="fromLabel" runat="server" Text='<%# Eval("FromName") %>' />
				</span><span style="float: right;">
					<asp:Label ID="dateLabel" runat="server" Text='<%# DateUtility.MakeFriendlyShortDateTime((DateTime)Eval("DateReceived")) %>' />
				</span>
			</div>
			<div style="padding: 2px;">
				<asp:Image runat="server" ID="highPriorityImage" ImageUrl="~/Images/imp-high.gif"
					Visible='<%# (int)Eval("Priority") == MessagePriority.High %>' CssClass="middle" />
				<asp:Image runat="server" ID="lowPriorityImage" ImageUrl="~/Images/imp-low.gif" Visible='<%# (int)Eval("Priority")  == MessagePriority.Low %>'
					CssClass="middle" />
				<asp:Image runat="server" ID="flaggedImage" ImageUrl="~/Images/icon-flag.gif" Visible='<%# (bool)Eval("IsFlagged") && !(bool)Eval("FlagCompleted") %>'
					CssClass="middle" />
				<asp:Image runat="server" ID="completedImage" ImageUrl="~/Images/icon-flag-complete.gif"
					Visible='<%# (bool)Eval("IsFlagged") && (bool)Eval("FlagCompleted") %>' CssClass="middle" />
				<asp:Image runat="server" ID="attachmentImage" ImageUrl="~/Images/icon-paperclip.gif"
					Visible='<%# (bool)Eval("HasAttachment") %>' CssClass="middle" />
				<asp:Label ID="subjectLabel" runat="server" Text='<%# Eval("Subject") %>' />
			</div>
		</iwc:ClickablePanel>
		<hr class="divider" />
	</ItemTemplate>
</asp:DataList>
<asp:Panel ID="pagePanel" runat="server">
	<div style="padding: 2px; height: 16px;">
		<span style="float: left;">
			<asp:HyperLink runat="server" ID="previousLink">&lt; previous</asp:HyperLink>
		</span><span style="float: right;">
			<asp:HyperLink runat="server" ID="nextLink">next &gt;</asp:HyperLink>
		</span>
	</div>
	<hr class="divider" />
</asp:Panel>
